<?php
require_once '../Model/Geolocation/OPPosition.php';
require_once '../Model/Game/OPRock.php';
require_once 'Octopus/Game/Mocks/MockDatabaseRockWithoutPlayerArround.php';

class RockGameWithoutAnyPlayerArroundTest extends PHPUnit_Framework_TestCase {
	
	public function setUp() {
		$mockDatabase = new MockDatabaseRockWithoutPlayerArround() ;
		OPPlayer::setDatabase($mockDatabase);
		
		$this->position = OPPosition::newWithLatitudeLongitude(1, 1);
		$this->rock		= OPRock::newWithPositionAndANumberOfPlayersToMove($this->position, 2);
		
	}
	
	/**
	 * @test
	 */
	public function RockShouldHaveAPosition() {
		$this->assertEquals($this->position, $this->rock->position());
		
	}
	
	/**
	 * @test
	 */
	public function RockShouldNotHaveId() {
		$this->assertEquals(null, $this->rock->id());
		
	}
	
	/**
	 * @test
	 */
	public function RockCannotMove() {
		$this->assertFalse($this->rock->canMove());
		
	}
	
}